package com.shangguan.atcrowdfunding.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @ClassName: StartSystemListener
 * @Description:
 * @Author: 一尘
 * @Date: 2020 年 01 月 14 11:50
 * @Version 1.0
 */
public class StartSystemListener implements ServletContextListener {

        /*初始话的时候进行添加*/
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        ServletContext context =  sce.getServletContext();
        String   path =  context.getContextPath();
        context.setAttribute("APP_PATH",path);
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

    }
}
